package cn.lili.controller;


import cn.lili.listener.AfterSaleMessageListener;
import cn.lili.modules.order.aftersale.entity.dos.AfterSale;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 异常售后订单消息重新执行
 *
 * @author liushuai(liushuai711 @ gmail.com)
 * @version v4.0
 * @Description:
 * @since 2023/4/14 16:39
 */
@RestController
@RequestMapping("/consumer/aftersale")
@Api(tags = "异常售后API")
@RequiredArgsConstructor
public class AfterSaleMessageRePush {


    private final AfterSaleMessageListener afterSaleMessageListener;

    @ApiOperation(value = "售后订单状态变更")
    @GetMapping("/change")
    public void change(AfterSale afterSale) {
        afterSaleMessageListener.onMessage(afterSale);
    }
}
